package rensoft.portfolio.client.lib.view.particles;

public class Vector {

  private double x;
  private double y;
  private double z;

  public Vector(int x, int y, int z) {
    reset(x, y, z);
  }

  public void addY(double gravity) {
    y += gravity;
  }

  public double getX() {
    return x;
  }

  public double getY() {
    return y;
  }

  public double getZ() {
    return z;
  }

  public void multiplyEq(double s) {
    x *= s;
    y *= s;
    z *= s;
  }

  public void plusEq(Vector vector) {
    x += vector.x;
    y += vector.y;
    z += vector.z;
  }

  public void reset(double x, double y, double z) {
    this.x = x;
    this.y = y;
    this.z = z;
  }

  // public void rotateY(double angle) {
  // tx = x;
  // tz = z;
  // cosRY = Math.cos(angle);
  // sinRY = Math.sin(angle);
  // x = tx * cosRY + tz * sinRY;
  // z = tx * -sinRY + tz * cosRY;
  // }

  @Override
  public String toString() {
    return "x:" + x + "y:" + y + "z:" + z;
  }

}
